from django import forms
from core.models.class_course import ClassCourse


class ClassCourseForm(forms.ModelForm):
    """班级课程表表单"""
    class Meta:
        model = ClassCourse
        fields = ['class_info', 'class_subject', 'weekday', 'course_period']
        widgets = {
            'class_info': forms.Select(attrs={'class': 'form-control'}),
            'class_subject': forms.Select(attrs={'class': 'form-control'}),
            'weekday': forms.Select(attrs={'class': 'form-control'}),
            'course_period': forms.Select(attrs={'class': 'form-control'}),
        }
        labels = {
            'class_info': '班级',
            'class_subject': '班级学科',
            'weekday': '星期几',
            'course_period': '课程时间段',
        }